Skip to content

chore: Fix tests, remove EOL OSes, fix Ruby 3.4 compatibility warnings - #421

Closed
RulerOf wants to merge 18 commits into
test-kitchen:mainfrom
RulerOf:fix-tests
Closed

chore: Fix tests, remove EOL OSes, fix Ruby 3.4 compatibility warnings#421
RulerOf wants to merge 18 commits into
test-kitchen:mainfrom
RulerOf:fix-tests

Conversation

@RulerOf

@RulerOf RulerOf commented Jul 2, 2024

Copy link
Copy Markdown
Contributor

Description

Most of the tests were broken.

Issues Resolved

I didn't create any, but this will fix the broken tests on #420

Type of Change

chore

Check List

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
@RulerOf RulerOf changed the title Fix tests, remove EOL OSes, fix Ruby 3.4 compatibility warnings chore: Fix tests, remove EOL OSes, fix Ruby 3.4 compatibility warnings Jul 2, 2024
Comment thread kitchen.yml
image: opensuse/leap:15.5
- name: opensuse-15.6
driver:
image: opensuse/leap:15

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This slug should get you the latest without having to maintain the version here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up putting in the two versions separately because both of them showed to still be under active support on the website.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait I see what you mean. Specify a "latest v15" in addition to a "specific v15."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leap:15 should always be the latest

@RulerOf
RulerOf marked this pull request as draft July 3, 2024 14:28
RulerOf added 10 commits July 3, 2024 13:59
Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Ruby is removing some gems from the standard library. Require them explicitly.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Development group gems resolved an old version of inspec on my machine, and would throw an ugly warning. Bump the minimum inspec version to resolve that.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
CentOS 7 is EOL. Stop testing it, and switch to a similar release.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Chef is not supported on every OS that kitchen-docker supports, so it doesn't really make sense to install it here. Also Dokken is a thing.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
The default busser verifier literally refuses to work, and the 1-test inspec is simple enough to work on everything.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Bundler shims and rubymine folder

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
CentOS 7, Ubuntu 18, Rocky 8, Debian 11 are all EOL.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Comment thread test/Dockerfile
@@ -1,4 +1,4 @@
FROM centos:7
FROM oraclelinux:7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the kitchen-dokken driver we switched to almalinux-9. Should probably do the same here for consistency and future proofing. Then the yum commands can be updated to dnf.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the Dockerfile and got it building successfully, but kitchen-docker complains the container isn't listening for ssh connections.

Perhaps I need to change the CMD to run the ssh server? It wasn't obvious to me why it worked with Oracle 7 but not Alma 9.

Stromweld and others added 4 commits July 3, 2024 17:56
Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>

add codeowners

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>

test

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>

test

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>

test

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
Everything is already testing with Inspec

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
The verifier doesn't work without it. Not sure why it was removed, but I know base PR was ongoing.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Add a step to the github action that uses an embedded ruby script to discover the list of suites directly from the kitchen config.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
RulerOf added 3 commits July 3, 2024 18:40
Do this instead of testing 15.5 and 15.6 explicitly

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
Current versions of Docker Desktop will output a LegacyKeyValueFormat
warning when using 'ENV key value' syntax. We switch to the updated 'ENV
key=value' syntax.

Signed-off-by: Andrew Bobulsky <rulerof@gmail.com>
@damacus damacus mentioned this pull request Mar 17, 2025
3 tasks
@damacus
damacus marked this pull request as ready for review November 8, 2025 23:58
Copilot AI added a commit that referenced this pull request Nov 9, 2025
Remove end-of-life operating systems and add newer versions:
- Remove ubuntu-18.04 (EOL April 2023)
- Remove centos-7 (EOL June 2024)
- Remove debian-11 (EOL approaching)
- Remove rockylinux-8 (replaced with rockylinux-9)
- Add ubuntu-22.04 and ubuntu-24.04
- Add centos-stream-9 (using dokken image)
- Add oraclelinux-8 and oraclelinux-9
- Update rockylinux to version 9
- Update test/Dockerfile from centos:7 to almalinux:9
- Update CI workflow matrix to match new platforms

This addresses part of the changes proposed in PR #421.

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
damacus added a commit that referenced this pull request Nov 9, 2025
* chore: Update test platforms to remove EOL operating systems

Remove end-of-life operating systems and add newer versions:
- Remove ubuntu-18.04 (EOL April 2023)
- Remove centos-7 (EOL June 2024)
- Remove debian-11 (EOL approaching)
- Remove rockylinux-8 (replaced with rockylinux-9)
- Add ubuntu-22.04 and ubuntu-24.04
- Add centos-stream-9 (using dokken image)
- Add oraclelinux-8 and oraclelinux-9
- Update rockylinux to version 9
- Update test/Dockerfile from centos:7 to almalinux:9
- Update CI workflow matrix to match new platforms

This addresses part of the changes proposed in PR #421.

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
@tas50

tas50 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Thanks for this @RulerOf, and apologies it sat for so long. I've gone through it file by file against current main — most of it has landed in the meantime (several parts byte-identically), and the rest has been overtaken by later changes.

Already landed: .github/CODEOWNERS, .markdownlint.yaml, release-please-config.json, .release-please-manifest.json, the ENV k=v fixes in container_helper.rb and dockerfile_helper.rb, the naming to moby-dangling regex in image_helper.rb, and commenting out kitchen_transport_api_version 1. kitchen.windows.yml is on ltsc2022.

Superseded: main's lint.yml is now on Ruby 3.4 / actions@v7, publish.yaml is on release-please v5, kitchen.yml has moved to AlmaLinux/Rocky/Debian 13/openSUSE 16 and to cinc, and test/Dockerfile is now almalinux:latest with dnf — which is exactly what @Stromweld asked for in review here.

Obsolete: the inspec / csv / syslog Gemfile pins, since main replaced InSpec with cinc-auditor.

Two things were still genuinely missing, plus the .gitignore lines, and I've carried those forward in #462:

  • login_command — this was the real find. kitchen login has never worked with this transport, since Transport::Base::Connection#login_command raises unless overridden. I reworked it slightly: it reads the connection's own @options rather than container.instance_variable_get(:@config) (that's the same hash, already available), splits the argv into individual tokens since Kitchen Kernel.execs it without a shell, and adds a powershell branch for Windows containers now that main has a windows-2022 platform. I also kept the configured username instead of nil'ing it to root, so the shell matches the environment the provisioner runs in — shout if you'd rather it dropped you at root.
  • The dead disabled/*.rb files — still present, still fully commented out.

Also worth saying: the dynamic "build the CI matrix by loading kitchen.yml through Kitchen::Config" idea in your lint.yml was neat, and main didn't adopt it — the matrix is still hardcoded and does drift. If you want to open that as its own PR it'd get a fair look.

Closing this one in favour of #462. Thanks again for digging into it.

@tas50 tas50 closed this Aug 22, 2026
tas50 added a commit that referenced this pull request Aug 22, 2026
* feat: Support `kitchen login` with the Docker transport

`Kitchen::Transport::Base::Connection#login_command` raises "Remote login not
supported" unless a transport overrides it, so `kitchen login` has never worked
for instances using the Docker transport. Implement it as an interactive
`docker exec` against the instance's container: `/bin/bash --login -i` on Linux
platforms and `powershell` on Windows ones.

Kitchen runs the result through `Kernel.exec` in its multi-argument form, which
bypasses the shell, so the argv is built as individual tokens and values are
left unquoted. The transport's socket, TLS, username, working_dir,
env_variables and privileged settings are all carried over; interactive/tty are
forced on and detach forced off, since a detached exec would return a session
the user cannot type into.

Ported forward from the unmerged #421, reworked to read the connection's own
`@options` rather than reaching into the container object with
`instance_variable_get`, and extended to cover Windows containers.

spec/inspec_helper_spec.rb evaluated `defined?(Kitchen::Verifier::CincAuditor)`
at spec-file load time to choose between two examples. RSpec loads every spec
file before running any example, so requiring the transport from a new spec
file defined that constant and invalidated the already-selected example. Move
the check inside the example and load the helper explicitly so it no longer
depends on spec load order.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: Remove dead disabled/ integration specs

test/integration/{capabilities,default}/disabled/ held three files whose entire
contents were commented out when busser-serverspec was dropped. They are not
referenced by kitchen.yml or any workflow.

Also ignore bin/* and .idea/*, both from #421.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants